<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>	
<%@ include file="/pub/headmeta.jsp" %>
</head>
<body class="edit-bgr-color">
	<div class="right-head"><span class="right-head-font">导入指标数据</span></div>
	<div align="center" style="width: 98%">	
		<form id="addForm" method="post" enctype="multipart/form-data">			
			<table cellpadding="5" style="width: 600px; font-size: 12px;">
				<tr>
					<td width="35%" align="right">上传说明：</td>
					<td width="65%" align="left"><input type="text" name="note" id="note"/>&nbsp;&nbsp;<font color='red'>*</font></td>					
				</tr>
				<tr>
					<td align="right">指标文件1：</td>
					<td align="left"><input type="file" name="file" id="file1"/>&nbsp;&nbsp;<font color='red'>*</font></td>					
				</tr>
				<tr>
					<td align="right">指标文件2：</td>
					<td align="left"><input type="file" name="file"/></td>					
				</tr>
				<tr>
					<td align="right">指标文件3：</td>
					<td align="left"><input type="file" name="file"/></td>					
				</tr>
				<tr>
					<td align="right">指标文件4：</td>
					<td align="left"><input type="file" name="file"/></td>					
				</tr>
				<tr>
					<td align="right">指标文件5：</td>
					<td align="left"><input type="file" name="file"/></td>					
				</tr>
				<tr>
					<td align="right">指标文件6：</td>
					<td align="left"><input type="file" name="file"/></td>					
				</tr>
				<tr>
					<td align="right">指标文件7：</td>
					<td align="left"><input type="file" name="file"/></td>					
				</tr>
				<tr>
					<td align="right">指标文件8：</td>
					<td align="left"><input type="file" name="file"/></td>					
				</tr>
				
			</table>
			<div class="edit-line"></div>
			<input  type="button" class="button-1" value="导入" onclick="doImport();"/>
			<input  type="button" class="button-1" value="重置" onclick="resetEx(this.form);"/>						
			<input  type="button" class="button-1" value="返回" onclick="back();"/>
		</form>
	</div>
</body>
</html>
<script type="text/javascript">
<!--
//自动调用初始化
$(document).ready(function(){	

});

//导入
function doImport() {
	if ($("#note").val()== ""){
		alert('上传说明不能为空！');
		return;
	}
	
	if ($("#file1").val()== ""){
		alert('指标文件1不能为空！');
		return;
	}
	var url="${ctx}/title!imp.action";
	$.uploadEx({        
        url: url, 
        formId: "addForm",
        dataType: 'json',
        onComplate: function(json) {
        	if (json.code==0) {	        		
        		back();
    		}else{
    			alert('导入失败！');
    		}
        }
	});
}

//返回
function back(){
	location.href="${ctx}/title!viewList.action";
}
//-->
</script>
